package com.huiqiao.lesson6;

import com.huiqiao.lesson6.beanConstructor.BeanConstrutorByBeanFacotryClass;
import com.huiqiao.lesson6.beanConstructor.BeanFactoryProxyClass;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

// 元注解包含
// @Configuration
// @ComponentScan 默认只扫描SpringbootApplication类所在的包
@SpringBootApplication
public class SrpingBootApplication {

    public static void main(String[] args) {
        // 创建spring容器，当前类作为配置类
        ConfigurableApplicationContext ioc = SpringApplication.run(SrpingBootApplication.class, args);

        System.out.println(ioc.getBean("beanConstrutorByBeanFacotryClass"));
        System.out.println(ioc.getBean(BeanFactoryProxyClass.class));
    }

}
